package com.guinea.system.dao;

import java.util.List;
import com.guinea.core.orm.HibernateDao;
import com.guinea.system.entity.UserRoleRel;

public class UserRoleRelDao extends HibernateDao {

	public Class getEntityClass() {
		return UserRoleRel.class;
	}

	public List getByUserRole(Long userId, Long roleId) {
		return find(
				"select e from UserRoleRel e where e.status = '1' and e.user.id = ? and e.role.id = ?",
				new Object[] { userId, roleId });
	}
	
}
